package com.dx.mapper;

import com.dx.domain.QaOperLog;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface LogMapper {

    @Insert("insert into qa_log (question, answer,created_by,created_time) values (#{question},#{answer},#{createdBy},#{createdTime});")
    void add(QaOperLog log);

    List<QaOperLog> list(@Param("question") String question, @Param("createdBy") Long createdBy, @Param("startTime") LocalDateTime startTime,@Param("endTime") LocalDateTime endTime);
}
